package com.wenwan.manage.pojo;

import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.wenwan.manage.pojo.LimitPage;
import com.wenwan.manage.setting.StatusSetting;

/**
 * 接口通用返回对象
 * 
 * @author Admin
 *
 * @param <T>
 */
@JsonInclude(Include.NON_NULL)
public class DataToObject<T> implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -5293752083886458155L;

	/**
	 * 主要的返回数据
	 */
	private T data;

	/**
	 * 返回的信息
	 */
	private String msg = StatusSetting.MSG_200;

	/**
	 * 返回的状态码
	 */
	private String code = StatusSetting.CODE_200;

	/**
	 * 分页查询时，此值存在
	 */
	private LimitPage limitPage;

	/**
	 * 需要贯穿整个流程时，此值存在
	 */
	private String token;

	/**
	 * 次要的返回数据
	 */
	private Object cliData;

	public DataToObject() {
		// TODO Auto-generated constructor stub
	}

	public DataToObject(T data, String msg, String code) {
		this.data = data;
		this.msg = msg;
		this.code = code;
	}

	public T getData() {
		return data;
	}

	public void setData(T data) {
		this.data = data;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public LimitPage getLimitPage() {
		return limitPage;
	}

	public void setLimitPage(LimitPage limitPage) {
		this.limitPage = limitPage;
	}

	public String getToken() {
		return token;
	}

	public void setToken(String token) {
		this.token = token;
	}

	public Object getCliData() {
		return cliData;
	}

	public void setCliData(Object cliData) {
		this.cliData = cliData;
	}

}
